package com.afc.struts.mapping;

import com.afc.struts.Action;
import com.afc.struts.form.ActionForm;

public interface ActionMapping
{
  public Action getAction();
  public Class<? extends ActionForm> getFormClass();
  public String getOriginalUrl();

  public class DefaultActionMapping implements ActionMapping
  {
    public DefaultActionMapping(Action anAction, Class<? extends ActionForm> aFormClass, String anOriginalUrl)
    {
      action = anAction;
      formClass = aFormClass;
      originalUrl = anOriginalUrl;
    }

    @Override
    public Action getAction()
    {
      return action;
    }

    @Override
    public Class<? extends ActionForm> getFormClass()
    {
      return formClass;
    }

    @Override
    public String getOriginalUrl()
    {
      return originalUrl;
    }

    protected Action action;
    protected Class<? extends ActionForm> formClass;
    protected String originalUrl;
  }
}
